package com.taobao.client;

import java.util.List;
import java.util.Map;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.taobao.client.obj.TopItem;
import com.taobao.client.obj.TopRefund;
import com.taobao.client.obj.TopTadget;
import com.taobao.client.obj.TopTrade;

/**
 * The async counterpart of <code>GreetingService</code>.
 */
@SuppressWarnings("unchecked")
public interface UpperServiceAsync {	
	void init(String url, String app, String secrt, String loginAddress, AsyncCallback<Boolean> callback);	
	
	void itemsGet(String nick, AsyncCallback callback);
	
	void addTrade(List<TopItem> item, String buyer, String seller,String name, String phone, String mobile, String province,
			String city, String area, String division_code, String post_code,
			String address_detail,boolean isNewAddress,String memo,String discount, AsyncCallback callback);
	
	void tradeSoldGet(String nick, AsyncCallback callback);		
	
	void tradeBoughtGet(String nick, AsyncCallback callback);	
	
	void getSession(String userName, String password, AsyncCallback<String> callBack);
	
	void getUrl(Map<String, String> params, AsyncCallback<String> callBack);
	
	void deliverySend(String tid, AsyncCallback<String> callBack);
	
	void getLoginURL(String domain,String url,AsyncCallback<String> callBack);
	
	void setSession(String session,String name,AsyncCallback<String> callBack);

	void getBuyerRefunds(String nick, AsyncCallback<List<TopRefund>> callback);

	void getSellerRefund(String seller,	AsyncCallback<List<TopRefund>> asyncCallback);

	void logout(String domain,String url,AsyncCallback<String> asyncCallback);
	
	void getRefundInfo(String refundId, AsyncCallback<TopRefund> asyncCallback);

	
	void applySubAppKey(String parentKey, String filePath, AsyncCallback<TopTadget> asyncCallback);

	
	void addTradeMemo(String memo, String tid , AsyncCallback<TopRefund> asyncCallback);

	/**
	 * Get the full info the trade.
	 * 
	 * @param tid
	 * @throws Exception
	 */
	void getTdFullInfo(String tid, String oid, AsyncCallback<TopTrade> asyncCallback) throws Exception;
}
